//
//  BK_Order_Model.h
//  bestkeep
//
//  Created by TOPTEAM on 2017/2/14.
//  Copyright © 2017年 utouu. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface BK_Order_Model : NSObject
@property(nonatomic, strong)NSArray  * orders;

@property(nonatomic, strong)NSString *orders_amount;//"orders_amount": "10.00",
@property(nonatomic, strong)NSString *orders_express_amount;//"orders_express_amount": "10.00",
@property(nonatomic, strong)NSString *orders_goods_amount;//"orders_goods_amount": "1",
@property(nonatomic, strong)NSString *orders_promotion_discount;//"orders_promotion_discount": "0.00",


@end

@interface BK_orders_dic_Model : NSObject
@property(nonatomic, strong)NSString *customs_tax_amount;//"customs_tax_amount": "0.00",
@property(nonatomic, strong)NSString *deliver_code;//"deliver_code": "310000",

@property (nonatomic,copy)NSArray *expressCompanyInfo;

@property(nonatomic, strong)NSString *lastSendDateZh;//"lastSendDateZh": "囤货普通预售最晚发货日期",
@property(nonatomic, strong)NSString *thNormalType;//"thNormalType": "0/1,1:是囤货普通预售，0:不是囤货普通预售",
@property(nonatomic, strong)NSString *express_companyid;//"express_companyid": "4KP5TemOScaq4AyYXIXTnQ",
@property(nonatomic, strong)NSString *integralGoodsId;//"integralGoodsId": "xxx//积分兑换商品的ID",
@property(nonatomic, strong)NSString *global_status;//"global_status": "0",
@property(nonatomic, strong)NSString *goods_total_amount;//"goods_total_amount": "12.00",

@property (nonatomic,copy)NSArray *order_amount_lable_list;

@property(nonatomic, strong)NSString *order_deliver_address;//"order_deliver_address": "上海市",
@property(nonatomic, strong)NSString *order_express_amount;//"order_express_amount": "10.00",

@property (nonatomic,copy)NSArray *order_items;

@property(nonatomic, strong)NSString *order_total_amount;//"order_total_amount": "22.00",
@property(nonatomic, strong)NSString *promotion_discount_amount;//"promotion_discount_amount": "0.00",
@property(nonatomic, strong)NSString *shoppingTicketDiscountPrice;//"shoppingTicketDiscountPrice": "12.00",

@property (nonatomic,copy)NSArray *shoppingTicketList;

@end
/**
 快递信息
 */
@interface BK_orders_dic_expressCompanyInfo_Model : NSObject


@property(nonatomic, strong)NSString *defaultSelected;//"defaultSelected": "1",
@property(nonatomic, strong)NSString *expressCompanyId;//"expressCompanyId": "4KP5TemOScaq4AyYXIXTnQ",
@property (nonatomic,strong)NSString *expressCompanyName;//"expressCompanyName": "普通快递",


@end


/**
 价格明细
 */
@interface BK_orders_dic_order_amount_lable_list_Model : NSObject

@property(nonatomic, strong)NSString *index;//"index": 0,
@property(nonatomic, strong)NSString *lableName;//"lableName": "商品金额",
@property (nonatomic,strong)NSString *lableVaule;//"lableVaule": "￥12.00",

@end
/**
 订单商品信息
 */
@interface BK_orders_dic_order_order_items_Model : NSObject

@property(nonatomic, strong)NSString *goods_amount;//"goods_amount": "1",
@property(nonatomic, strong)NSString *goods_id;//"goods_id": "0UevxWimQYu4vPZ08Ec5EA",
@property (nonatomic,strong)NSString *goods_img;//"goods_img": "http://bestkeep-test.oss-cn-hangzhou.aliyuncs.com/goods/img/goods_1469499624559.jpg@60p_80q",
@property (nonatomic,strong)NSString *goods_name;//"goods_name": "asdfasd",
@property (nonatomic,strong)NSString *goods_reserve_id;//"goods_reserve_id": "QdtyvuzAQsizisJovKOuWQ",
@property (nonatomic,strong)NSString *goods_send_date;//"goods_send_date": "",
@property (nonatomic,strong)NSString *member_price;// "member_price": "12.00",

@property (nonatomic,copy)NSArray *member_price_detail;

@property (nonatomic,strong)NSString *sale_property;//"sale_property": "颜色:red|性别:n",
@property (nonatomic,strong)NSString *userPrice;//"userPrice": "",
@property (nonatomic,strong)NSString *stockShareCode;//"stockShareCode": "xxx//囤货分享码",
/*
 * BK3.0  添加支持7天无条件可退换货
 */
@property (nonatomic,strong)NSString *canReturnSaled;//"canReturnSaled": "是否支持7天无条件可退换货(默认为0：不支持，1支持)",

@property (nonatomic,strong)NSString *thNormalType;//"thNormalType": "0/1,1:是囤货普通预售，0:不是囤货普通预售",
@end


/**
 优惠券
 */
@interface BK_orders_dic_order_shoppingTicketList_Model : NSObject


@property(nonatomic, strong)NSString *invalidTimeStr;//"invalidTimeStr": "2016-10-21到期",
@property(nonatomic, strong)NSString *remainingWarning;//"remainingWarning": "",
@property(nonatomic, strong)NSString *selected;//"selected": "1",
@property(nonatomic, strong)NSString *useTypeStr;//"useTypeStr": "仅限国内商品使用",
@property(nonatomic, strong)NSString *usedRangeStr;//"usedRangeStr": "",
@property(nonatomic, strong)NSString *userCouponId;//"userCouponId": "PkLwcNShRtafx8guvctX8Q",
@property(nonatomic, strong)NSString *canUseFlag;//"canUseFlag": "0/1//0:不可使用，1:可使用",
@property(nonatomic, strong)NSString *reduceCost;
@end


/**
 当前快递
 */
@interface BKOrderCurrentCourier : NSObject
@property(nonatomic, strong)BK_orders_dic_expressCompanyInfo_Model *courier;
@property(nonatomic, assign)NSInteger count;
@property(nonatomic, assign)NSInteger index;
@end

/**
 当前优惠券
 */
@interface BKOrderCurrentCoupon : NSObject
@property(nonatomic, strong)NSArray <BK_orders_dic_order_shoppingTicketList_Model *> *coupons;
@property(nonatomic, assign)BK_orders_dic_order_shoppingTicketList_Model *usedCoupon;
@end
/**
 使用地址
 */
@interface BKOrderUsedAddress : NSObject
/*
 "deliver_id": "xxx//收货地址ID",
 "deliver_name": "xxx//收货人姓名",
 "deliver_mobile": "xxx//收货人手机号",
 "deliver_address": "xxxx//收货地址（完整地址）",
 */
@property(nonatomic, strong)NSString * deliver_id;
@property(nonatomic, strong)NSString * deliver_mobile;
@property(nonatomic, strong)NSString * deliver_address;
@property(nonatomic, strong)NSString * deliver_name;

@end

/*
 接口名称：	deliver-address_default
 接口用途：	获取用户默认的收货地址
 method：	POST
 接口地址：	deliver-address/default
 输入参数：	无
 返回数据：
 {
 "success": "true/false //成功/失败",
 "msg": "xxx //返回消息",
 "code": "xxx //返回编码",
 "data":
 {
 "deliver_id": "xxx//收货地址ID",
 "deliver_name": "xxx//收货人姓名",
 "deliver_mobile": "xxx//收货人手机号",
 "deliver_address": "xxxx//收货地址（完整地址）",
 }
 }
 */


/*
 接口名称：	order_confirm
 接口用途：	用户根据商品生成订单确认数据
 method：	POST
 接口地址：	order/confirm
 输入参数：
 key	参数类型	是否必须	参数解释
 deliver_id	string	是	收货地址ID
 express_companyid	string	否	快递公司ID
 goods_id	string	是	商品ID
 amount	string	是	购买数量
 goods_reserve_id	string	是	商品库存ID
 sendDate	string	是	发货日期 2016-06-06
 userPrice	string	是	用户出价 25.52
 usedShoppingTicketId	string	是	用户使用优惠券ID
 integralGoodsId	string	是	积分兑换商品的ID
 thnormaltype	string	是	是否囤货普通预售，1：是，0：否
 tickets	json	是	购物券兑换的购物券数据
 返回数据：
 {
 "data":
 {
 "orders":
 [
 {
 "customs_tax_amount": "0.00",
 "deliver_code": "310000",
 "expressCompanyInfo":
 [
 {
 "defaultSelected": "1",
 "expressCompanyId": "4KP5TemOScaq4AyYXIXTnQ",
 "expressCompanyName": "普通快递",
 }
 ],
 "lastSendDateZh": "囤货普通预售最晚发货日期",
 "thNormalType": "0/1,1:是囤货普通预售，0:不是囤货普通预售",
 "express_companyid": "4KP5TemOScaq4AyYXIXTnQ",
 "integralGoodsId": "xxx//积分兑换商品的ID",
 "global_status": "0",
 "goods_total_amount": "12.00",
 "order_amount_lable_list":
 [
 {
 "index": 0,
 "lableName": "商品金额",
 "lableVaule": "￥12.00",
 },
 {
 "index": 1,
 "lableName": "运费",
 "lableVaule": "￥10.00",
 },
 {
 "index": 2,
 "lableName": "优惠",
 "lableVaule": "￥0.00",
 },
 {
 "index": 3,
 "lableName": "优惠券",
 "lableVaule": "￥12.00",
 },
 {
 "index": 4,
 "lableName": "合计",
 "lableVaule": "￥22.00",
 }
 ],
 "order_deliver_address": "上海市",
 "order_express_amount": "10.00",
 "order_items":
 [
 {
 "goods_amount": "1",
 "goods_id": "0UevxWimQYu4vPZ08Ec5EA",
 "goods_img": "http://bestkeep-test.oss-cn-hangzhou.aliyuncs.com/goods/img/goods_1469499624559.jpg@60p_80q",
 "goods_name": "asdfasd",
 "goods_reserve_id": "QdtyvuzAQsizisJovKOuWQ",
 "goods_send_date": "",
 "member_price": "12.00",
 "member_price_detail":
 [
 ],
 "sale_property": "颜色:red|性别:n",
 "userPrice": "",
 "stockShareCode": "xxx//囤货分享码",
 }
 ],
 "order_total_amount": "22.00",
 "promotion_discount_amount": "0.00",
 "shoppingTicketDiscountPrice": "12.00",
 "shoppingTicketList":
 [
 {
 "invalidTimeStr": "2016-10-21到期",
 "remainingWarning": "",
 "selected": "1",
 "useTypeStr": "仅限国内商品使用",
 "usedRangeStr": "",
 "userCouponId": "PkLwcNShRtafx8guvctX8Q",
 "canUseFlag": "0/1//0:不可使用，1:可使用",
 },
 {
 "invalidTimeStr": "2016-10-20到期",
 "remainingWarning": "",
 "selected": "0",
 "useTypeStr": "仅限国内商品使用",
 "usedRangeStr": "",
 "userCouponId": "W2D6hFajTA-EofELwkgh-Q",
 "canUseFlag": "0/1//0:不可使用，1:可使用",
 },
 {
 "invalidTimeStr": "2016-09-30到期",
 "remainingWarning": "仅剩1天",
 "selected": "0",
 "useTypeStr": "仅限国内商品使用",
 "usedRangeStr": "",
 "userCouponId": "K_2__G0nRCy4Es-AXYIF7w",
 "canUseFlag": "0/1//0:不可使用，1:可使用",
 }
 ]
 }
 ],
 "orders_amount": "10.00",
 "orders_express_amount": "10.00",
 "orders_goods_amount": "1",
 "orders_promotion_discount": "0.00",
 },
 "msg": "生成订单信息成功!",
 "success": true,
 }
 备注：
 新添加tickets:[{"couponId":"xxx"}]
 */













































